<%@page import="com.zt.exam.bean.Selection"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>showSelection.jsp</title>

	<style type="text/css">
		.list{
			border: black 1px solid;
			border-collapse: collapse;
			margin: 10px auto;
		}
		.list th,td{
			border: black 1px solid;
			padding: 10px;
		}
	</style>
</head>

<body>
	<%
		List<Selection> list = (List<Selection>)session.getAttribute("list");
	%>
	<table class="list">
		<tr>
			<th>姓名</th>
			<th>学号</th>
			<th>电话</th>
			<th>所属专业</th>
			<th>指导老师</th>
			<th>课程名称</th>
			<th>成功提交</th>
			<th>备注</th>
			<th>选题时间</th>
		</tr>
		<%
			for(int i = 0; i < list.size(); i++){
				Selection selection = list.get(i);
				String res = "";
				if(selection != null){
					for(String s : selection.getResult()){
						res = res + s + " ";
					}
				}
		%>
		<tr>
			<td><%=selection.getName() %></td>
			<td><%=selection.getStudentNumber() %></td>
			<td><%=selection.getTelephone() %></td>
			<td><%=selection.getMajor() %></td>
			<td><%=selection.getTeacher() %></td>
			<td><%=selection.getCourseName() %></td>
			<td><%=res %></td>
			<td><%=selection.getRemark() %></td>
			<td><%=selection.getTimeStr() %></td>
		</tr>
		
		<%
			}
		%>
		<tr>
			<td colspan="9"><a href="selection.jsp">进入选题页</a></td>
		</tr>
	</table>
	
</body>
</html>
